package org.jiuling.camera.yinshi.spring.config;

import org.jiuling.camera.yinshi.YinShiCloud;
import org.jiuling.camera.yinshi.config.YinShiConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 萤石摄像头Bean配置
 * @author 紫灵
 * @date 2022年11月03日 09时23分10秒
 */
@Component
@Configuration
public class YinshiCameraBeanConfig {

    @Bean
    @ConfigurationProperties(prefix = "jiu-ling.yinshi")
    public YinShiConfig yinShiConfig(){
        return new YinShiConfig();
    }

    @Bean
    public YinShiCloud yinShiCloud(){
        return new YinShiCloud(yinShiConfig());
    }
}
